#pragma once
#include <QPixmap>

#include "IApplication.h"

struct CmdInfo {
  int cmdId = 0;
  int actualCmdId = 0;
  const char* parameters = nullptr;
  const char* title = nullptr;
  const bool raw_param =
      true;  // to mark if the parameters is unchanged(compare to which is
             // loaded from Menu.cfg/cmd.cfg/woptions...)

  CmdInfo(int cmd, int baseCmd, const char* p, const char* t)
      : cmdId(cmd), actualCmdId(baseCmd), parameters(p), title(t) {}

  CmdInfo(int cmd, int baseCmd, const char* p, const char* t,
          const bool raw_param_)
      : cmdId(cmd),
        actualCmdId(baseCmd),
        parameters(p),
        title(t),
        raw_param(raw_param_) {}
};

class QWidget;
class IModule {
 public:
  virtual void initialize(IApplication* app) = 0;
  virtual void unInitialize() = 0;

  virtual int execCommand(CmdInfo ci) const = 0;  // utf-8
  virtual bool closeCommandWindow(int cmdId, QWidget* widget) = 0;
};

// IModule* getModule();
